#ifndef  _CDATABASE_H_
#define  _CDATABASE_H_

#include "stdafx.h"
#include "sqlite3.h"
#include "CppSQLite3.h"

class CDatabase 
{
public:
	CDatabase(void);
	virtual ~CDatabase(void);

	std_method(Connect)(LPCSTR dbpath);
	std_method_(UINT, IsValid)();
	std_method(Close)();

	std_method(IsTableExist)(LPCSTR strTableName, UINT& Exist);
	std_method_(std::string,  GetDbPath)();
	std_method(GetTableStruct)(LPCSTR strTableName, vector<string>& VecField);
	std_method(ExeSql)(LPCSTR sql);
	std_method(InsertSql)(LPCSTR sql, vector<varaint_t*>& VecParams, Table& table, ULONG stm, ULONG ltm);

private:
	CppSQLite3DB	m_pSqlite3;
	string			m_strDBPath;
};

#endif







